<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <!--v-once指令没有值，v-once所在的标签初次动态渲染之后，变为静态内容，不再动态渲染-->
        <h2 v-once>n的初始值: {{n}}</h2>
        <h2 >当前n的值: {{n}}</h2>
        <button @click="n++">点我n+1</button>
    </div>
 
    <script>
        Vue.config.productionTip = false
        let vm = new Vue({
            el: "#root",
            data: {
                n: 0,
            }
        })

    </script>
</body>
</html>